home *** CD-ROM | disk | FTP | other *** search
- property pFirst, pLAST
- global gSpriteNumber
-
- on new me
- global SPRITE_GOTO_BTN, SPRITE_GOTO_FIRST, SPRITE_GOTO_LAST, SPRITE_RELATED_BTN, SPRITE_RELATED_FIRST, SPRITE_RELATED_LAST
- case gSpriteNumber of
- SPRITE_GOTO_BTN:
- set pFirst to SPRITE_GOTO_FIRST
- set pLAST to SPRITE_GOTO_LAST
- SPRITE_RELATED_BTN:
- set pFirst to SPRITE_RELATED_FIRST
- set pLAST to SPRITE_RELATED_LAST
- end case
- ActivatePopup(pFirst, pLAST, #SWITCHCAST)
- return me
- end
-
- on popUpMouseDown me
- set gSpriteNumber to the clickOn
- if (gSpriteNumber >= pFirst) and (gSpriteNumber <= pLAST) then
- puppetSound("mouseDwn.aif")
- downbutton()
- end if
- end
-
- on popUpMouseUp me
- global CAST_BOOKMARK_BTN, CAST_QUITPOPUP_BTN, SPRITE_GOTO_BTN, gPopupObj, gSavedPopupsL
- if gSpriteNumber <> the clickOn then
- if IsButton() and (getButtonState() = #down) then
- upbutton()
- end if
- exit
- end if
- if (gSpriteNumber < pFirst) or (gSpriteNumber > pLAST) then
- DeactivatePopup(pFirst, pLAST, #SWITCHCAST)
- exit
- end if
- set iButton to the memberNum of sprite gSpriteNumber
- if fCalcButtonCast(iButton, #UP) = CAST_BOOKMARK_BTN then
- pushList(gSavedPopupsL, gPopupObj)
- set gPopupObj to new(script "BOOKMARK POPUP")
- exit
- end if
- if fCalcButtonCast(iButton, #UP) = CAST_QUITPOPUP_BTN then
- pushList(gSavedPopupsL, gPopupObj)
- set gPopupObj to new(script "QUIT POPUP")
- exit
- end if
- DeactivatePopup(pFirst, pLAST, #SWITCHCAST)
- jumpButton()
- end
-